using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Watermelon;

public class DummyTargetBehaviour : MonoBehaviour, IAimTarget
    {
    [SerializeField] Transform aimTarget;

    [Header("Settings")]
    [SerializeField] int maxHealth = 1;

    private bool isTargetActive;
    public bool IsTargetActive => isTargetActive;

    public Transform Target => aimTarget;

    // Health
    private int currentHealth;
    public int CurrentHealth => currentHealth;
    public int MaxHealth => maxHealth;

    // Sensor
    public GameObject SensorGameObject => gameObject;
    public Transform SensorTransform => transform;
    public bool IsSensorObjectActive => isTargetActive;

    private void Awake()
    {
        if (aimTarget == null)
            aimTarget = transform;
    }

    public void OnTargetFocused(Transform sensorTransform)
    {
        Debug.Log("Focused");
    }

    public void OnTargetUnfocused(Transform sensorTransform)
    {
        Debug.Log("Unfocused");
    }

    public void OnSlapped(PlayerBehavior playerBehavior, int damage, Vector3 normalizedDirection, float force)
    {
        Debug.Log("SLAPPED!");
    }

    public void OnDetected(Transform sensorTransform)
    {

    }

    public void OnUndetected(Transform sensorTransform)
    {

    }
}
